\hypertarget{group__i2c__api}{
\section{I2c\_\-api}
\label{group__i2c__api}\index{I2c\_\-api@{I2c\_\-api}}
}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{group__i2c__api_ga48d59ec93ae3b341edce0717a7d5ecfd}{I2CMasterInitExpClk} (unsigned long ulBase, unsigned long ulI2CClk, tBoolean bFast)
\item 
void \hyperlink{group__i2c__api_ga9c3ed4958b9e41e2cce1823f22087e97}{I2CSlaveInit} (unsigned long ulBase, unsigned char ucSlaveAddr)
\item 
void \hyperlink{group__i2c__api_gab7955109fcaec1f12a2b1f4a607bb86e}{I2CMasterEnable} (unsigned long ulBase)
\item 
void \hyperlink{group__i2c__api_ga92829a5d1b5aeef127869ba049e31ce3}{I2CSlaveEnable} (unsigned long ulBase)
\item 
void \hyperlink{group__i2c__api_ga233adf3f435bd24443f526a03e51b7c4}{I2CMasterDisable} (unsigned long ulBase)
\item 
void \hyperlink{group__i2c__api_ga072eae643178f75b04db3cfd476072d0}{I2CSlaveDisable} (unsigned long ulBase)
\item 
void \hyperlink{group__i2c__api_ga8024bb9b5f30873b7306579ed1611f1e}{I2CIntRegister} (unsigned long ulBase, void($\ast$pfnHandler)(void))
\item 
void \hyperlink{group__i2c__api_ga87cef0146157013eaeb9a7da0d1b0692}{I2CIntUnregister} (unsigned long ulBase)
\item 
void \hyperlink{group__i2c__api_gafbc2e0b9b23390414165023c5e737c8e}{I2CMasterIntEnable} (unsigned long ulBase)
\item 
void \hyperlink{group__i2c__api_gaeffce6a079d4f2e7a423a3e27ef0d7f9}{I2CSlaveIntEnable} (unsigned long ulBase)
\item 
void \hyperlink{group__i2c__api_gadce6fabd28a26b27c7e65e4749e80ea2}{I2CSlaveIntEnableEx} (unsigned long ulBase, unsigned long ulIntFlags)
\item 
void \hyperlink{group__i2c__api_gaa33280ece60763cddedc9546ede1169f}{I2CMasterIntDisable} (unsigned long ulBase)
\item 
void \hyperlink{group__i2c__api_gaef0b84a2a96426ccc03580c3ffc67224}{I2CSlaveIntDisable} (unsigned long ulBase)
\item 
void \hyperlink{group__i2c__api_ga119a7d3846e462e9c32614b9e2f61df6}{I2CSlaveIntDisableEx} (unsigned long ulBase, unsigned long ulIntFlags)
\item 
tBoolean \hyperlink{group__i2c__api_ga9e4c679441170da895ef56bc1154a260}{I2CMasterIntStatus} (unsigned long ulBase, tBoolean bMasked)
\item 
tBoolean \hyperlink{group__i2c__api_gafadf4c6c5093df4ce0095ae4a19da9a9}{I2CSlaveIntStatus} (unsigned long ulBase, tBoolean bMasked)
\item 
unsigned long \hyperlink{group__i2c__api_ga2b4f179a52168d715dd35c34b8392278}{I2CSlaveIntStatusEx} (unsigned long ulBase, tBoolean bMasked)
\item 
void \hyperlink{group__i2c__api_ga3b65591f03b0e45be17332f4ea9e4834}{I2CMasterIntClear} (unsigned long ulBase)
\item 
void \hyperlink{group__i2c__api_ga191c4ac2e859a57eb61b9a66eb5eda47}{I2CSlaveIntClear} (unsigned long ulBase)
\item 
void \hyperlink{group__i2c__api_ga07f739bd5a7f9e13969631c7a4145249}{I2CSlaveIntClearEx} (unsigned long ulBase, unsigned long ulIntFlags)
\item 
void \hyperlink{group__i2c__api_gafa2973a16e556497dcfe85d7438df338}{I2CMasterSlaveAddrSet} (unsigned long ulBase, unsigned char ucSlaveAddr, tBoolean bReceive)
\item 
tBoolean \hyperlink{group__i2c__api_ga5b6bf0ad4346c388a54a51e28419574f}{I2CMasterBusy} (unsigned long ulBase)
\item 
tBoolean \hyperlink{group__i2c__api_ga569c01a9ca4efabf49ca4f86ac425931}{I2CMasterBusBusy} (unsigned long ulBase)
\item 
void \hyperlink{group__i2c__api_ga1d37632f9558c726ea4f30badc01384c}{I2CMasterControl} (unsigned long ulBase, unsigned long ulCmd)
\item 
unsigned long \hyperlink{group__i2c__api_ga360b1bf124d070933011eb182d7c9a33}{I2CMasterErr} (unsigned long ulBase)
\item 
void \hyperlink{group__i2c__api_gaa878ae56f03a7bffba54ebdca5ed70a9}{I2CMasterDataPut} (unsigned long ulBase, unsigned char ucData)
\item 
unsigned long \hyperlink{group__i2c__api_ga4ff38f84844639281f17ec06a868b004}{I2CMasterDataGet} (unsigned long ulBase)
\item 
unsigned long \hyperlink{group__i2c__api_ga1f5cb89c822601c01afd8111bb4141c2}{I2CSlaveStatus} (unsigned long ulBase)
\item 
void \hyperlink{group__i2c__api_ga9da281e21187deb599f59738c99c4f50}{I2CSlaveDataPut} (unsigned long ulBase, unsigned char ucData)
\item 
unsigned long \hyperlink{group__i2c__api_gac1ee63a79c717dbc3a50d9ef05ab01d2}{I2CSlaveDataGet} (unsigned long ulBase)
\end{DoxyCompactItemize}


\subsection{Function Documentation}
\hypertarget{group__i2c__api_ga8024bb9b5f30873b7306579ed1611f1e}{
\index{i2c\_\-api@{i2c\_\-api}!I2CIntRegister@{I2CIntRegister}}
\index{I2CIntRegister@{I2CIntRegister}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CIntRegister}]{\setlength{\rightskip}{0pt plus 5cm}void I2CIntRegister (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{void($\ast$)(void)}]{ pfnHandler}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_ga8024bb9b5f30873b7306579ed1611f1e}
Registers an interrupt handler for the I2C module.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Master module. \item[{\em pfnHandler}]is a pointer to the function to be called when the I2C interrupt occurs.\end{DoxyParams}
This sets the handler to be called when an I2C interrupt occurs. This will enable the global interrupt in the interrupt controller; specific I2C interrupts must be enabled via \hyperlink{group__i2c__api_gafbc2e0b9b23390414165023c5e737c8e}{I2CMasterIntEnable()} and \hyperlink{group__i2c__api_gaeffce6a079d4f2e7a423a3e27ef0d7f9}{I2CSlaveIntEnable()}. If necessary, it is the interrupt handler's responsibility to clear the interrupt source via \hyperlink{group__i2c__api_ga3b65591f03b0e45be17332f4ea9e4834}{I2CMasterIntClear()} and \hyperlink{group__i2c__api_ga191c4ac2e859a57eb61b9a66eb5eda47}{I2CSlaveIntClear()}.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__interrupt__api_ga471d00d73ae22faa426c202f608e9c69}{IntRegister()} for important information about registering interrupt handlers.
\end{DoxySeeAlso}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_ga87cef0146157013eaeb9a7da0d1b0692}{
\index{i2c\_\-api@{i2c\_\-api}!I2CIntUnregister@{I2CIntUnregister}}
\index{I2CIntUnregister@{I2CIntUnregister}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CIntUnregister}]{\setlength{\rightskip}{0pt plus 5cm}void I2CIntUnregister (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_ga87cef0146157013eaeb9a7da0d1b0692}
Unregisters an interrupt handler for the I2C module.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Master module.\end{DoxyParams}
This function will clear the handler to be called when an I2C interrupt occurs. This will also mask off the interrupt in the interrupt controller so that the interrupt handler no longer is called.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__interrupt__api_ga471d00d73ae22faa426c202f608e9c69}{IntRegister()} for important information about registering interrupt handlers.
\end{DoxySeeAlso}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_ga569c01a9ca4efabf49ca4f86ac425931}{
\index{i2c\_\-api@{i2c\_\-api}!I2CMasterBusBusy@{I2CMasterBusBusy}}
\index{I2CMasterBusBusy@{I2CMasterBusBusy}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CMasterBusBusy}]{\setlength{\rightskip}{0pt plus 5cm}tBoolean I2CMasterBusBusy (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_ga569c01a9ca4efabf49ca4f86ac425931}
Indicates whether or not the I2C bus is busy.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Master module.\end{DoxyParams}
This function returns an indication of whether or not the I2C bus is busy. This function can be used in a multi-\/master environment to determine if another master is currently using the bus.

\begin{DoxyReturn}{Returns}
Returns {\bfseries true} if the I2C bus is busy; otherwise, returns {\bfseries false}. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_ga5b6bf0ad4346c388a54a51e28419574f}{
\index{i2c\_\-api@{i2c\_\-api}!I2CMasterBusy@{I2CMasterBusy}}
\index{I2CMasterBusy@{I2CMasterBusy}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CMasterBusy}]{\setlength{\rightskip}{0pt plus 5cm}tBoolean I2CMasterBusy (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_ga5b6bf0ad4346c388a54a51e28419574f}
Indicates whether or not the I2C Master is busy.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Master module.\end{DoxyParams}
This function returns an indication of whether or not the I2C Master is busy transmitting or receiving data.

\begin{DoxyReturn}{Returns}
Returns {\bfseries true} if the I2C Master is busy; otherwise, returns {\bfseries false}. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_ga1d37632f9558c726ea4f30badc01384c}{
\index{i2c\_\-api@{i2c\_\-api}!I2CMasterControl@{I2CMasterControl}}
\index{I2CMasterControl@{I2CMasterControl}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CMasterControl}]{\setlength{\rightskip}{0pt plus 5cm}void I2CMasterControl (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulCmd}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_ga1d37632f9558c726ea4f30badc01384c}
Controls the state of the I2C Master module.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Master module. \item[{\em ulCmd}]command to be issued to the I2C Master module\end{DoxyParams}
This function is used to control the state of the Master module send and receive operations. The {\itshape ucCmd\/} parameter can be one of the following values:


\begin{DoxyItemize}
\item {\bfseries I2C\_\-MASTER\_\-CMD\_\-SINGLE\_\-SEND} 
\item {\bfseries I2C\_\-MASTER\_\-CMD\_\-SINGLE\_\-RECEIVE} 
\item {\bfseries I2C\_\-MASTER\_\-CMD\_\-BURST\_\-SEND\_\-START} 
\item {\bfseries I2C\_\-MASTER\_\-CMD\_\-BURST\_\-SEND\_\-CONT} 
\item {\bfseries I2C\_\-MASTER\_\-CMD\_\-BURST\_\-SEND\_\-FINISH} 
\item {\bfseries I2C\_\-MASTER\_\-CMD\_\-BURST\_\-SEND\_\-ERROR\_\-STOP} 
\item {\bfseries I2C\_\-MASTER\_\-CMD\_\-BURST\_\-RECEIVE\_\-START} 
\item {\bfseries I2C\_\-MASTER\_\-CMD\_\-BURST\_\-RECEIVE\_\-CONT} 
\item {\bfseries I2C\_\-MASTER\_\-CMD\_\-BURST\_\-RECEIVE\_\-FINISH} 
\item {\bfseries I2C\_\-MASTER\_\-CMD\_\-BURST\_\-RECEIVE\_\-ERROR\_\-STOP} 
\end{DoxyItemize}

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_ga4ff38f84844639281f17ec06a868b004}{
\index{i2c\_\-api@{i2c\_\-api}!I2CMasterDataGet@{I2CMasterDataGet}}
\index{I2CMasterDataGet@{I2CMasterDataGet}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CMasterDataGet}]{\setlength{\rightskip}{0pt plus 5cm}unsigned long I2CMasterDataGet (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_ga4ff38f84844639281f17ec06a868b004}
Receives a byte that has been sent to the I2C Master.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Master module.\end{DoxyParams}
This function reads a byte of data from the I2C Master Data Register.

\begin{DoxyReturn}{Returns}
Returns the byte received from by the I2C Master, cast as an unsigned long. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_gaa878ae56f03a7bffba54ebdca5ed70a9}{
\index{i2c\_\-api@{i2c\_\-api}!I2CMasterDataPut@{I2CMasterDataPut}}
\index{I2CMasterDataPut@{I2CMasterDataPut}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CMasterDataPut}]{\setlength{\rightskip}{0pt plus 5cm}void I2CMasterDataPut (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned char}]{ ucData}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_gaa878ae56f03a7bffba54ebdca5ed70a9}
Transmits a byte from the I2C Master.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Master module. \item[{\em ucData}]data to be transmitted from the I2C Master\end{DoxyParams}
This function will place the supplied data into I2C Master Data Register.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_ga233adf3f435bd24443f526a03e51b7c4}{
\index{i2c\_\-api@{i2c\_\-api}!I2CMasterDisable@{I2CMasterDisable}}
\index{I2CMasterDisable@{I2CMasterDisable}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CMasterDisable}]{\setlength{\rightskip}{0pt plus 5cm}void I2CMasterDisable (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_ga233adf3f435bd24443f526a03e51b7c4}
Disables the I2C master block.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Master module.\end{DoxyParams}
This will disable operation of the I2C master block.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_gab7955109fcaec1f12a2b1f4a607bb86e}{
\index{i2c\_\-api@{i2c\_\-api}!I2CMasterEnable@{I2CMasterEnable}}
\index{I2CMasterEnable@{I2CMasterEnable}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CMasterEnable}]{\setlength{\rightskip}{0pt plus 5cm}void I2CMasterEnable (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_gab7955109fcaec1f12a2b1f4a607bb86e}
Enables the I2C Master block.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Master module.\end{DoxyParams}
This will enable operation of the I2C Master block.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_ga360b1bf124d070933011eb182d7c9a33}{
\index{i2c\_\-api@{i2c\_\-api}!I2CMasterErr@{I2CMasterErr}}
\index{I2CMasterErr@{I2CMasterErr}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CMasterErr}]{\setlength{\rightskip}{0pt plus 5cm}unsigned long I2CMasterErr (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_ga360b1bf124d070933011eb182d7c9a33}
Gets the error status of the I2C Master module.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Master module.\end{DoxyParams}
This function is used to obtain the error status of the Master module send and receive operations.

\begin{DoxyReturn}{Returns}
Returns the error status, as one of {\bfseries I2C\_\-MASTER\_\-ERR\_\-NONE}, {\bfseries I2C\_\-MASTER\_\-ERR\_\-ADDR\_\-ACK}, {\bfseries I2C\_\-MASTER\_\-ERR\_\-DATA\_\-ACK}, or {\bfseries I2C\_\-MASTER\_\-ERR\_\-ARB\_\-LOST}. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_ga48d59ec93ae3b341edce0717a7d5ecfd}{
\index{i2c\_\-api@{i2c\_\-api}!I2CMasterInitExpClk@{I2CMasterInitExpClk}}
\index{I2CMasterInitExpClk@{I2CMasterInitExpClk}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CMasterInitExpClk}]{\setlength{\rightskip}{0pt plus 5cm}void I2CMasterInitExpClk (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulI2CClk, }
\item[{tBoolean}]{ bFast}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_ga48d59ec93ae3b341edce0717a7d5ecfd}
Initializes the I2C Master block.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Master module. \item[{\em ulI2CClk}]is the rate of the clock supplied to the I2C module. \item[{\em bFast}]set up for fast data transfers\end{DoxyParams}
This function initializes operation of the I2C Master block. Upon successful initialization of the I2C block, this function will have set the bus speed for the master, and will have enabled the I2C Master block.

If the parameter {\itshape bFast\/} is {\bfseries true}, then the master block will be set up to transfer data at 400 kbps; otherwise, it will be set up to transfer data at 100 kbps.

The peripheral clock will be the same as the processor clock. This will be the value returned by \hyperlink{group__sysctl__api_ga7fd64f17ef7b589c51d72df5837f13eb}{SysCtlClockGet()}, or it can be explicitly hard coded if it is constant and known (to save the code/execution overhead of a call to \hyperlink{group__sysctl__api_ga7fd64f17ef7b589c51d72df5837f13eb}{SysCtlClockGet()}).

This function replaces the original I2CMasterInit() API and performs the same actions. A macro is provided in {\ttfamily \hyperlink{i2c_8h_source}{i2c.h}} to map the original API to this API.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_ga3b65591f03b0e45be17332f4ea9e4834}{
\index{i2c\_\-api@{i2c\_\-api}!I2CMasterIntClear@{I2CMasterIntClear}}
\index{I2CMasterIntClear@{I2CMasterIntClear}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CMasterIntClear}]{\setlength{\rightskip}{0pt plus 5cm}void I2CMasterIntClear (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_ga3b65591f03b0e45be17332f4ea9e4834}
Clears I2C Master interrupt sources.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Master module.\end{DoxyParams}
The I2C Master interrupt source is cleared, so that it no longer asserts. This must be done in the interrupt handler to keep it from being called again immediately upon exit.

\begin{DoxyNote}{Note}
Since there is a write buffer in the Cortex-\/M3 processor, it may take several clock cycles before the interrupt source is actually cleared. Therefore, it is recommended that the interrupt source be cleared early in the interrupt handler (as opposed to the very last action) to avoid returning from the interrupt handler before the interrupt source is actually cleared. Failure to do so may result in the interrupt handler being immediately reentered (since NVIC still sees the interrupt source asserted).
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_gaa33280ece60763cddedc9546ede1169f}{
\index{i2c\_\-api@{i2c\_\-api}!I2CMasterIntDisable@{I2CMasterIntDisable}}
\index{I2CMasterIntDisable@{I2CMasterIntDisable}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CMasterIntDisable}]{\setlength{\rightskip}{0pt plus 5cm}void I2CMasterIntDisable (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_gaa33280ece60763cddedc9546ede1169f}
Disables the I2C Master interrupt.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Master module.\end{DoxyParams}
Disables the I2C Master interrupt source.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_gafbc2e0b9b23390414165023c5e737c8e}{
\index{i2c\_\-api@{i2c\_\-api}!I2CMasterIntEnable@{I2CMasterIntEnable}}
\index{I2CMasterIntEnable@{I2CMasterIntEnable}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CMasterIntEnable}]{\setlength{\rightskip}{0pt plus 5cm}void I2CMasterIntEnable (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_gafbc2e0b9b23390414165023c5e737c8e}
Enables the I2C Master interrupt.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Master module.\end{DoxyParams}
Enables the I2C Master interrupt source.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_ga9e4c679441170da895ef56bc1154a260}{
\index{i2c\_\-api@{i2c\_\-api}!I2CMasterIntStatus@{I2CMasterIntStatus}}
\index{I2CMasterIntStatus@{I2CMasterIntStatus}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CMasterIntStatus}]{\setlength{\rightskip}{0pt plus 5cm}tBoolean I2CMasterIntStatus (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{tBoolean}]{ bMasked}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_ga9e4c679441170da895ef56bc1154a260}
Gets the current I2C Master interrupt status.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Master module. \item[{\em bMasked}]is false if the raw interrupt status is requested and true if the masked interrupt status is requested.\end{DoxyParams}
This returns the interrupt status for the I2C Master module. Either the raw interrupt status or the status of interrupts that are allowed to reflect to the processor can be returned.

\begin{DoxyReturn}{Returns}
The current interrupt status, returned as {\bfseries true} if active or {\bfseries false} if not active. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_gafa2973a16e556497dcfe85d7438df338}{
\index{i2c\_\-api@{i2c\_\-api}!I2CMasterSlaveAddrSet@{I2CMasterSlaveAddrSet}}
\index{I2CMasterSlaveAddrSet@{I2CMasterSlaveAddrSet}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CMasterSlaveAddrSet}]{\setlength{\rightskip}{0pt plus 5cm}void I2CMasterSlaveAddrSet (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned char}]{ ucSlaveAddr, }
\item[{tBoolean}]{ bReceive}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_gafa2973a16e556497dcfe85d7438df338}
Sets the address that the I2C Master will place on the bus.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Master module. \item[{\em ucSlaveAddr}]7-\/bit slave address \item[{\em bReceive}]flag indicating the type of communication with the slave\end{DoxyParams}
This function will set the address that the I2C Master will place on the bus when initiating a transaction. When the {\itshape bReceive\/} parameter is set to {\bfseries true}, the address will indicate that the I2C Master is initiating a read from the slave; otherwise the address will indicate that the I2C Master is initiating a write to the slave.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_gac1ee63a79c717dbc3a50d9ef05ab01d2}{
\index{i2c\_\-api@{i2c\_\-api}!I2CSlaveDataGet@{I2CSlaveDataGet}}
\index{I2CSlaveDataGet@{I2CSlaveDataGet}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CSlaveDataGet}]{\setlength{\rightskip}{0pt plus 5cm}unsigned long I2CSlaveDataGet (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_gac1ee63a79c717dbc3a50d9ef05ab01d2}
Receives a byte that has been sent to the I2C Slave.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Slave module.\end{DoxyParams}
This function reads a byte of data from the I2C Slave Data Register.

\begin{DoxyReturn}{Returns}
Returns the byte received from by the I2C Slave, cast as an unsigned long. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_ga9da281e21187deb599f59738c99c4f50}{
\index{i2c\_\-api@{i2c\_\-api}!I2CSlaveDataPut@{I2CSlaveDataPut}}
\index{I2CSlaveDataPut@{I2CSlaveDataPut}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CSlaveDataPut}]{\setlength{\rightskip}{0pt plus 5cm}void I2CSlaveDataPut (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned char}]{ ucData}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_ga9da281e21187deb599f59738c99c4f50}
Transmits a byte from the I2C Slave.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Slave module. \item[{\em ucData}]data to be transmitted from the I2C Slave\end{DoxyParams}
This function will place the supplied data into I2C Slave Data Register.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_ga072eae643178f75b04db3cfd476072d0}{
\index{i2c\_\-api@{i2c\_\-api}!I2CSlaveDisable@{I2CSlaveDisable}}
\index{I2CSlaveDisable@{I2CSlaveDisable}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CSlaveDisable}]{\setlength{\rightskip}{0pt plus 5cm}void I2CSlaveDisable (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_ga072eae643178f75b04db3cfd476072d0}
Disables the I2C slave block.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Slave module.\end{DoxyParams}
This will disable operation of the I2C slave block.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_ga92829a5d1b5aeef127869ba049e31ce3}{
\index{i2c\_\-api@{i2c\_\-api}!I2CSlaveEnable@{I2CSlaveEnable}}
\index{I2CSlaveEnable@{I2CSlaveEnable}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CSlaveEnable}]{\setlength{\rightskip}{0pt plus 5cm}void I2CSlaveEnable (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_ga92829a5d1b5aeef127869ba049e31ce3}
Enables the I2C Slave block.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Slave module.\end{DoxyParams}
This will enable operation of the I2C Slave block.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_ga9c3ed4958b9e41e2cce1823f22087e97}{
\index{i2c\_\-api@{i2c\_\-api}!I2CSlaveInit@{I2CSlaveInit}}
\index{I2CSlaveInit@{I2CSlaveInit}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CSlaveInit}]{\setlength{\rightskip}{0pt plus 5cm}void I2CSlaveInit (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned char}]{ ucSlaveAddr}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_ga9c3ed4958b9e41e2cce1823f22087e97}
Initializes the I2C Slave block.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Slave module. \item[{\em ucSlaveAddr}]7-\/bit slave address\end{DoxyParams}
This function initializes operation of the I2C Slave block. Upon successful initialization of the I2C blocks, this function will have set the slave address and have enabled the I2C Slave block.

The parameter {\itshape ucSlaveAddr\/} is the value that will be compared against the slave address sent by an I2C master.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_ga191c4ac2e859a57eb61b9a66eb5eda47}{
\index{i2c\_\-api@{i2c\_\-api}!I2CSlaveIntClear@{I2CSlaveIntClear}}
\index{I2CSlaveIntClear@{I2CSlaveIntClear}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CSlaveIntClear}]{\setlength{\rightskip}{0pt plus 5cm}void I2CSlaveIntClear (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_ga191c4ac2e859a57eb61b9a66eb5eda47}
Clears I2C Slave interrupt sources.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Slave module.\end{DoxyParams}
The I2C Slave interrupt source is cleared, so that it no longer asserts. This must be done in the interrupt handler to keep it from being called again immediately upon exit.

\begin{DoxyNote}{Note}
Since there is a write buffer in the Cortex-\/M3 processor, it may take several clock cycles before the interrupt source is actually cleared. Therefore, it is recommended that the interrupt source be cleared early in the interrupt handler (as opposed to the very last action) to avoid returning from the interrupt handler before the interrupt source is actually cleared. Failure to do so may result in the interrupt handler being immediately reentered (since NVIC still sees the interrupt source asserted).
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_ga07f739bd5a7f9e13969631c7a4145249}{
\index{i2c\_\-api@{i2c\_\-api}!I2CSlaveIntClearEx@{I2CSlaveIntClearEx}}
\index{I2CSlaveIntClearEx@{I2CSlaveIntClearEx}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CSlaveIntClearEx}]{\setlength{\rightskip}{0pt plus 5cm}void I2CSlaveIntClearEx (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulIntFlags}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_ga07f739bd5a7f9e13969631c7a4145249}
Clears I2C Slave interrupt sources.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Slave module. \item[{\em ulIntFlags}]is a bit mask of the interrupt sources to be cleared.\end{DoxyParams}
The specified I2C Slave interrupt sources are cleared, so that they no longer assert. This must be done in the interrupt handler to keep it from being called again immediately upon exit.

The {\itshape ulIntFlags\/} parameter has the same definition as the {\itshape ulIntFlags\/} parameter to \hyperlink{group__i2c__api_gadce6fabd28a26b27c7e65e4749e80ea2}{I2CSlaveIntEnableEx()}.

\begin{DoxyNote}{Note}
Since there is a write buffer in the Cortex-\/M3 processor, it may take several clock cycles before the interrupt source is actually cleared. Therefore, it is recommended that the interrupt source be cleared early in the interrupt handler (as opposed to the very last action) to avoid returning from the interrupt handler before the interrupt source is actually cleared. Failure to do so may result in the interrupt handler being immediately reentered (since NVIC still sees the interrupt source asserted).
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_gaef0b84a2a96426ccc03580c3ffc67224}{
\index{i2c\_\-api@{i2c\_\-api}!I2CSlaveIntDisable@{I2CSlaveIntDisable}}
\index{I2CSlaveIntDisable@{I2CSlaveIntDisable}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CSlaveIntDisable}]{\setlength{\rightskip}{0pt plus 5cm}void I2CSlaveIntDisable (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_gaef0b84a2a96426ccc03580c3ffc67224}
Disables the I2C Slave interrupt.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Slave module.\end{DoxyParams}
Disables the I2C Slave interrupt source.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_ga119a7d3846e462e9c32614b9e2f61df6}{
\index{i2c\_\-api@{i2c\_\-api}!I2CSlaveIntDisableEx@{I2CSlaveIntDisableEx}}
\index{I2CSlaveIntDisableEx@{I2CSlaveIntDisableEx}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CSlaveIntDisableEx}]{\setlength{\rightskip}{0pt plus 5cm}void I2CSlaveIntDisableEx (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulIntFlags}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_ga119a7d3846e462e9c32614b9e2f61df6}
Disables individual I2C Slave interrupt sources.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Slave module. \item[{\em ulIntFlags}]is the bit mask of the interrupt sources to be disabled.\end{DoxyParams}
Disables the indicated I2C Slave interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor.

The {\itshape ulIntFlags\/} parameter has the same definition as the {\itshape ulIntFlags\/} parameter to \hyperlink{group__i2c__api_gadce6fabd28a26b27c7e65e4749e80ea2}{I2CSlaveIntEnableEx()}.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_gaeffce6a079d4f2e7a423a3e27ef0d7f9}{
\index{i2c\_\-api@{i2c\_\-api}!I2CSlaveIntEnable@{I2CSlaveIntEnable}}
\index{I2CSlaveIntEnable@{I2CSlaveIntEnable}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CSlaveIntEnable}]{\setlength{\rightskip}{0pt plus 5cm}void I2CSlaveIntEnable (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_gaeffce6a079d4f2e7a423a3e27ef0d7f9}
Enables the I2C Slave interrupt.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Slave module.\end{DoxyParams}
Enables the I2C Slave interrupt source.

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_gadce6fabd28a26b27c7e65e4749e80ea2}{
\index{i2c\_\-api@{i2c\_\-api}!I2CSlaveIntEnableEx@{I2CSlaveIntEnableEx}}
\index{I2CSlaveIntEnableEx@{I2CSlaveIntEnableEx}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CSlaveIntEnableEx}]{\setlength{\rightskip}{0pt plus 5cm}void I2CSlaveIntEnableEx (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{unsigned long}]{ ulIntFlags}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_gadce6fabd28a26b27c7e65e4749e80ea2}
Enables individual I2C Slave interrupt sources.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Slave module. \item[{\em ulIntFlags}]is the bit mask of the interrupt sources to be enabled.\end{DoxyParams}
Enables the indicated I2C Slave interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor.

The {\itshape ulIntFlags\/} parameter is the logical OR of any of the following:


\begin{DoxyItemize}
\item {\bfseries I2C\_\-SLAVE\_\-INT\_\-STOP} -\/ Stop condition detected interrupt
\item {\bfseries I2C\_\-SLAVE\_\-INT\_\-START} -\/ Start condition detected interrupt
\item {\bfseries I2C\_\-SLAVE\_\-INT\_\-DATA} -\/ Data interrupt
\end{DoxyItemize}

\begin{DoxyReturn}{Returns}
None. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_gafadf4c6c5093df4ce0095ae4a19da9a9}{
\index{i2c\_\-api@{i2c\_\-api}!I2CSlaveIntStatus@{I2CSlaveIntStatus}}
\index{I2CSlaveIntStatus@{I2CSlaveIntStatus}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CSlaveIntStatus}]{\setlength{\rightskip}{0pt plus 5cm}tBoolean I2CSlaveIntStatus (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{tBoolean}]{ bMasked}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_gafadf4c6c5093df4ce0095ae4a19da9a9}
Gets the current I2C Slave interrupt status.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Slave module. \item[{\em bMasked}]is false if the raw interrupt status is requested and true if the masked interrupt status is requested.\end{DoxyParams}
This returns the interrupt status for the I2C Slave module. Either the raw interrupt status or the status of interrupts that are allowed to reflect to the processor can be returned.

\begin{DoxyReturn}{Returns}
The current interrupt status, returned as {\bfseries true} if active or {\bfseries false} if not active. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_ga2b4f179a52168d715dd35c34b8392278}{
\index{i2c\_\-api@{i2c\_\-api}!I2CSlaveIntStatusEx@{I2CSlaveIntStatusEx}}
\index{I2CSlaveIntStatusEx@{I2CSlaveIntStatusEx}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CSlaveIntStatusEx}]{\setlength{\rightskip}{0pt plus 5cm}unsigned long I2CSlaveIntStatusEx (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase, }
\item[{tBoolean}]{ bMasked}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_ga2b4f179a52168d715dd35c34b8392278}
Gets the current I2C Slave interrupt status.


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Slave module. \item[{\em bMasked}]is false if the raw interrupt status is requested and true if the masked interrupt status is requested.\end{DoxyParams}
This returns the interrupt status for the I2C Slave module. Either the raw interrupt status or the status of interrupts that are allowed to reflect to the processor can be returned.

\begin{DoxyReturn}{Returns}
Returns the current interrupt status, enumerated as a bit field of values described in \hyperlink{group__i2c__api_gadce6fabd28a26b27c7e65e4749e80ea2}{I2CSlaveIntEnableEx()}. 
\end{DoxyReturn}
\hypertarget{group__i2c__api_ga1f5cb89c822601c01afd8111bb4141c2}{
\index{i2c\_\-api@{i2c\_\-api}!I2CSlaveStatus@{I2CSlaveStatus}}
\index{I2CSlaveStatus@{I2CSlaveStatus}!i2c_api@{i2c\_\-api}}
\subsubsection[{I2CSlaveStatus}]{\setlength{\rightskip}{0pt plus 5cm}unsigned long I2CSlaveStatus (
\begin{DoxyParamCaption}
\item[{unsigned long}]{ ulBase}
\end{DoxyParamCaption}
)}}
\label{group__i2c__api_ga1f5cb89c822601c01afd8111bb4141c2}
Gets the I2C Slave module status


\begin{DoxyParams}{Parameters}
\item[{\em ulBase}]is the base address of the I2C Slave module.\end{DoxyParams}
This function will return the action requested from a master, if any. Possible values are:


\begin{DoxyItemize}
\item {\bfseries I2C\_\-SLAVE\_\-ACT\_\-NONE} 
\item {\bfseries I2C\_\-SLAVE\_\-ACT\_\-RREQ} 
\item {\bfseries I2C\_\-SLAVE\_\-ACT\_\-TREQ} 
\item {\bfseries I2C\_\-SLAVE\_\-ACT\_\-RREQ\_\-FBR} 
\end{DoxyItemize}

\begin{DoxyReturn}{Returns}
Returns {\bfseries I2C\_\-SLAVE\_\-ACT\_\-NONE} to indicate that no action has been requested of the I2C Slave module, {\bfseries I2C\_\-SLAVE\_\-ACT\_\-RREQ} to indicate that an I2C master has sent data to the I2C Slave module, {\bfseries I2C\_\-SLAVE\_\-ACT\_\-TREQ} to indicate that an I2C master has requested that the I2C Slave module send data, and {\bfseries I2C\_\-SLAVE\_\-ACT\_\-RREQ\_\-FBR} to indicate that an I2C master has sent data to the I2C slave and the first byte following the slave's own address has been received. 
\end{DoxyReturn}
